<template>
   <div>
      <h1>子组件</h1>
      <div>{{count}}</div>
      <div><button @click="count++">+</button></div>
   </div>
</template>

<script>
export default {
    data(){
        return{
            count:1
        }
    },
     beforeCreate(){
        console.log('子、beforeCreate');
    },
    created(){
        console.log('子、created');
    },
    beforeMount(){
        console.log('子、beforeMount');
    },
    mounted(){
        console.log('子、mounted');
    },
    beforeUpdate(){
        console.log('子、beforeUpdate')
    },
    updated(){
        console.log('子、update');
    },
    beforeDestroy(){
        console.log('子、beforeDestroy');
      
    },
    destroyed(){
        console.log('子、destroyed');  
    }
}
</script>

<style>

</style>